//
//  GameLayer.h
//  618
//
//  Created by Ling on 13-6-21.
//  Copyright 2013年 __618工作室__. All rights reserved.
//  游戏层

#import <Foundation/Foundation.h>

#import "cocos2d.h"

#import "BallSprite.h"

@interface NSObject (GameLayerDelegate)

- (void) nextLevel;
- (void) restartGame;
- (void) continueGames;
- (void) saveGames;
- (void) endGame;

@end

@interface GameLayer : CCLayer {
    CCSprite *background;
    CCSprite *statusBar;
    BallSprite *ball;
    NSMutableArray *ballArray;
    CCSpriteBatchNode *spriteNode;
    BOOL gameOver;
    CCLabelTTF *scoreLabel;
    CCLabelTTF *hightScoreLabel;
	int score;
    int hightScore;
    BOOL isClickAbled;
    NSMutableArray *ballpre;
    NSMutableArray *scoreArr;
    NSMutableArray *emptyArr;
    
    
}
@property (nonatomic, retain) id delegate;
@property (nonatomic, retain) CCSprite *background;
@property (nonatomic, retain) CCSprite *statusBar;
@property (nonatomic, retain) CCSprite *over;

@property (nonatomic, retain) NSMutableArray *ballArray;
@property (nonatomic, retain) NSMutableArray *num;
@property (nonatomic, retain) NSMutableArray *ballpre;
@property (nonatomic, assign) int selected; //用于记录选择的球的序列，-1 为未选择
@property (nonatomic, retain) CCLabelTTF *scoreLabel;
@property (nonatomic, retain) CCLabelTTF *hightScoreLabel;
@property (nonatomic, assign) int score;
@property (nonatomic, retain) CCSprite *tipSprite;
@property (nonatomic, assign) CGPoint tipPoint;

@end
